package com.boofie.blog.exception;

import com.boofie.blog.model.ResultEnum;

/**
 * @author boofie
 * @date 2021/8/20 21:40
 */
public class MyDefException extends RuntimeException {

    private Integer code;

    public MyDefException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = code;
    }

    public MyDefException(String message, Integer code) {
        super(message);
        this.code = code;
    }
    @Override
    public String toString() {
        return "MyDefException{" +
                "code=" + code +
                "message=" + this.getMessage()+
                '}';
    }
}
